<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
$daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
$avatar=pdo_getcolumn('core_members',array('id'=>$return['item']['mid']),'avatar');
$return['plugin']= pdo_get('core_plugins',array('name'=>$_SESSION['plugin_name']));
$return['account']=pdo_get('core_accounts',array('uniacid'=>$_SESSION['uniacid']),array('title','desc','logo','groupid','credit2','endtime','opendiys'));
$return['group']=pdo_get('core_account_group',array('id'=>$account['groupid']),array('id','title','access','resource','opendiys'));
$return['store']['logo']=$return['store']['logo']?$return['store']['logo']:$avatar;
$return['status0']=pdo_count('jy_weishop_order',array('uniacid'=>$_SESSION['uniacid'],'status'=>0,'createtime >'=>$daytime));
$return['status1']=pdo_count('jy_weishop_order',array('uniacid'=>$_SESSION['uniacid'],'status'=>1,'createtime >'=>$daytime));
$return['status2']=pdo_count('jy_weishop_order',array('uniacid'=>$_SESSION['uniacid'],'status'=>2,'createtime >'=>$daytime));
$return['status3']=pdo_count('jy_weishop_order',array('uniacid'=>$_SESSION['uniacid'],'status'=>3,'createtime >'=>$daytime));
$return['status4']=pdo_count('jy_weishop_order',array('uniacid'=>$_SESSION['uniacid'],'status'=>4,'createtime >'=>$daytime));
$return['ispay']=pdo_count('jy_weishop_order',array('uniacid'=>$_SESSION['uniacid'],'ispay'=>1,'createtime >'=>$daytime),'id');
$return['ispayfee']=pdo_getsum('jy_weishop_order',array('uniacid'=>$_SESSION['uniacid'],'ispay'=>1,'createtime >'=>$daytime),'price');
$return['orderfee']=price($return['ispayfee']/$return['ispay']);
$return['goodsnum']=pdo_count('jy_weishop_goods',array('uniacid'=>$_SESSION['uniacid'],'merchid'=>0),'id');
$return['verifygoodsnum']=pdo_count('jy_weishop_verifygoods_log',array('uniacid'=>$_SESSION['uniacid'],'salerid'=>$_SESSION['uid'],'verifydate >'=>$daytime),'id');
$return['verifynum']=pdo_count('jy_weishop_order_verify',array('uniacid'=>$_SESSION['uniacid'],'clerk_id'=>$_SESSION['uid'],'verifytime >'=>$daytime),'id');
$return['selfverifynum']=pdo_count('jy_weishop_order_self',array('uniacid'=>$_SESSION['uniacid'],'clerk_id'=>$_SESSION['uid'],'verifytime >'=>$daytime),'id');
$verifylog=pdo_getall('jy_weishop_order_verify',array('uniacid'=>$_SESSION['uniacid'],'clerk_id'=>$_SESSION['uid'],'verifytime >'=>$daytime),array('orderid'));
$return['verifyfee']=0;
foreach($verifylog as &$vo){
	$vo['price']=pdo_getcolumn('jy_weishop_order',array('id'=>$vo['orderid']),'price');
	$return['verifyfee'] +=$vo['price'];
}
$selfverifylog=pdo_getall('jy_weishop_order_self',array('uniacid'=>$_SESSION['uniacid'],'clerk_id'=>$_SESSION['uid'],'verifytime >'=>$daytime),array('orderid'));
$return['selfverifyfee']=0;
foreach($selfverifylog as &$so){
	$so['price']=pdo_getcolumn('jy_weishop_order_self',array('id'=>$so['orderid']),'price');
	$return['selfverifyfee'] +=$so['price'];
}
$return['top_plugin_menu']=$this->menu();
$return['current_plugin']=$_SESSION['current_plugin'];
exi($return);